﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace MgSoft.K3Cloud.WebApi.Dto
{
    public class BaseApiOutputDto : BaseApiDto
    {
        private long? id { get; set; }

        /// <summary>
        /// 内码
        /// </summary>
        [JsonIgnore]
        public virtual long Id
        {
            get
            {
                if (!id.HasValue)
                {
                    id = Convert.ToInt64(IdString);
                }
                return Convert.ToInt64(id);
            }
            set
            {
                id = value;
            }
        }

        [JsonProperty("Id")]
        public virtual string IdString { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public virtual string Number { get; set; }
        public virtual long DIndex { get; set; }
    }
}
